package com.wlyuan.index.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yuanjie
 */
@Data
@EqualsAndHashCode
public class CombineIndexVO implements Serializable {
    /**
     * @author yuanjie
     */
    @Data
    @EqualsAndHashCode
    public static class Relation implements Serializable {
        @ApiModelProperty("身份")
        private Integer character;
        @ApiModelProperty("运单状态")
        private Integer status;
        @ApiModelProperty("租户ID")
        private Long tenantId;
        @ApiModelProperty("报价单ID")
        private Long quotationId;
        @ApiModelProperty("报价单号")
        private String quotationNo;
        @ApiModelProperty("报价状态")
        private Integer quotationStatus;
        @ApiModelProperty("账单时间")
        @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
        private LocalDateTime billAt;
        @ApiModelProperty("签收类型")
        private Integer signType;
        @ApiModelProperty("签收时间")
        @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
        private LocalDateTime signAt;
        @ApiModelProperty("标记")
        private List<Integer> highlights;
        @ApiModelProperty("可报价")
        private Boolean callQuote;
    }

    @ApiModelProperty("合单ID")
    private Long combineId;

    @ApiModelProperty("合同编号")
    private String contractNo;

    @ApiModelProperty("报价单ID")
    private Long quotationId;

    @ApiModelProperty("发货方ID")
    private Long customerId;

    @ApiModelProperty("发货方名称")
    private String customerName;

    @ApiModelProperty("发货方类型")
    private Integer customerType;

    @ApiModelProperty("承运方ID")
    private Long carrierId;

    @ApiModelProperty("承运方名称")
    private String carrierName;

    @ApiModelProperty("承运方类型")
    private Integer carrierType;

    @ApiModelProperty("总数量")
    private Integer totalQuantity;

    @ApiModelProperty("总重量")
    private BigDecimal calculateWeight;

    @ApiModelProperty("总体积")
    private BigDecimal calculateVolume;

    @ApiModelProperty("总体积")
    private BigDecimal calculateValue;

    @ApiModelProperty("发货时间")
    @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private LocalDateTime fromTime;

    @ApiModelProperty("到货时间")
    @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private LocalDateTime toTime;

    @ApiModelProperty("跟踪方式")
    private Integer trackType;

    @ApiModelProperty("跟踪单号")
    private String trackNo;

    @ApiModelProperty("创建时间")
    @JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private LocalDateTime createAt;

    @ApiModelProperty("关单状态")
    private Integer closeStatus;

    @ApiModelProperty("是否有费用")
    private Boolean hasFees;

    @ApiModelProperty("是否过关账期")
    private Boolean endBill;

    @ApiModelProperty("所属关系")
    private List<Relation> relations;

    @ApiModelProperty("租户ID")
    private Long tenantId;
}
